package Day015_File类_递归_IO流.ZuoYe;

import java.io.FileInputStream;

/**
 * @author zhangyan
 * @date 2020/5/6 18:23
 */
public class Test8 {
    public static void main(String[] args) throws Exception {
        //创建字节输入流对象
        FileInputStream fis = new FileInputStream("Demo02\\aaa\\c.txt");

        //定义数组
        byte[] bytes = new byte[2];
        //定义变量 存储读取的数据的个数
        int a;
        //循环遍历
        while ((a = fis.read(bytes)) != -1) {

            System.out.print(new String(bytes,0,a));
        }
    }
}
